package main

import (
	"baliance.com/gooxml/document"
	"fmt"
	"log"
)

func main() {
	path := "/home/s/Download/jyzj/基础/练习/lcjyjc_lx0201.docx"
	doc, err := document.Open(path)

	if err != nil {
		log.Fatalf("error opening doc file")
	}
	for i, p := range doc.Paragraphs() {
		fmt.Println("-------第", i, "段-------")
		for j, run := range p.Runs() {
			fmt.Print("\t-------第", j, "格式片段--------")
			fmt.Print(run.Text())
		}
		fmt.Println()
	}
}
